home *** CD-ROM | disk | FTP | other *** search
/ Super PC 35 / Super PC 35 (Shareware).iso / spc / UTIL / READ602 / READ.DOC < prev    next >
Encoding:
Text File  |  1996-01-20  |  13.4 KB  |  314 lines

  1. READ.DOC                             1                         Revised: 01/20/96
  2.  
  3. Program written by:
  4.                         Bruce Guthrie
  5.                         Room H-4885
  6.                         U.S. Dept of Commerce/ESA/STAT-USA
  7.                         Washington, DC 20230
  8.  
  9.                         voice: (202) 482-3234
  10.                         e-mail: bguthrie@doc.gov
  11.  
  12. You may freely copy and re-distribute this program; however, the U.S. Department
  13. of Commerce neither guarantees nor assures compatibility of the program with all
  14. computer software or hardware.
  15.  
  16. Foreign users:  Please provide an Internet e-mail address in all correspondence.
  17.  
  18.  
  19. READ allows you to view any ASCII text document with 16,000 lines or less (about
  20. 900,000 bytes).  You can also search for text within a document,  scroll  around
  21. in the document, and split up big files into small files for printing or copying
  22. to another file.
  23.  
  24.  
  25. Features of the READ program:
  26.   * Handles files up to 16,000 lines only.
  27.   * Supports a mouse scroll bar at the top if a compatible mouse is detected.
  28.   * Handles DOS text files (lines end with CR/LF), Mac text files (lines end
  29.     with CR), or Unix text files (lines end with LF).
  30.   * Allows text to be blocked and copied or printed.
  31.   * Supports 43/50-line mode under EGA and VGA.
  32.   * Allows jumping to DOS as well as allowing you to turn off this feature
  33.     (useful for public-use terminals).
  34.   * Supports printer-initializing strings for wide and normal-width text.
  35.   * Allows the user to adjust terminal colors.
  36.   * Allows text searching within the file, either case-sensitive or
  37.     case-insensitive.
  38.   * Shows a ruler line if desired.
  39.   * Shows the file before it has finished loading so you can start reading
  40.     sooner.
  41.   * Can Ctrl-PgUp/Ctrl-PgDn among up to 100 files.
  42.   * Expands tabs on display.
  43.  
  44.  
  45.  
  46. READ.DOC                             2                         Revised: 01/20/96
  47.  
  48. Specifying parameters:
  49.  
  50. Parameters for this program can be set in the following ways.  The last  setting
  51. encountered always wins:
  52.   - Read from an *.INI file (see BRUCEINI.DOC file),
  53.   - Through the use of an environmental variable (SET READ=whatever), or
  54.   - From the command line (see "Syntax" below)
  55.  
  56.  
  57. The READ.INI file:
  58.  
  59. The READ.INI file (see BRUCEINI.DOC) is very  useful  because  READ.EXE  doesn't
  60. have a default for setting compressed  mode  on  your  printer  when  you  print
  61. things.  If you have a Hewlett-Packard  printer,  it  is  recommended  that  you
  62. create a READ.INI file that's stored in the same directory as the READ.EXE file.
  63. The READ.INI should have at least the following lines:
  64.  
  65.         /INITT=\027E
  66.         /INITW=\027E\027(s16.66H
  67.         /AFTERF=\012\027E
  68.         /AFTERP=\012\027E
  69.  
  70. The READ.INI file can be created with any text editor.  You  can  also  use  the
  71. free READINIT.EXE program if you have it.
  72.  
  73.  
  74. READ.DOC                             3                         Revised: 01/20/96
  75.  
  76. Syntax:
  77.  
  78.     READ [ filespec | @listfile ] [ /TITLE="title" ] [ /DATE=NONE ]
  79.       [ /line ] [ /MONO | /COLOR ] [ /EGA | /VGA ] [ /-MOUSE ] [ /DOS | /-DOS ]
  80.       [ /Iinitfile | /-I ] [ /Q ] [ /PORT=port ] [ /INITT=string ]
  81.       [ /INITW=string ] [ /AFTERP=string ] [ /AFTERF=string ]
  82.       [ /COLOR=nnn nnn nnn nnn ] [ /? ] [ /?&H ]
  83.  
  84. where:
  85.  
  86. "filespec" is the file specification you want to  view.   You  can  use  a  path
  87. specification and a single  wildcard  if  you'd  like.   It  defaults  to  three
  88. wildcard selections; *.DOC, *.TXT, and *.BAT.  If more than one document in  the
  89. directory matches the wildcard, you can switch back and forth between  documents
  90. with Ctrl-PgUp and Ctrl-PgDn.  The program allows you to view up to 100 files in
  91. a single pass (it will skip the 101st *.TXT file).
  92.  
  93. "@listfile" is a text file that contains the names of any files you want READ to
  94. process.  The text file should contain one filename, with path if  desired,  per
  95. line.  You can include an optional title after any of the file  name  references
  96. (see /TITLE="title" option).
  97.  
  98. "/TITLE="title" " lets you specify an optional descriptive title  to  appear  at
  99. the bottom of the screen instead of the file name.  The title can be  up  to  29
  100. characters in length unless /PAGE=NONE is specified in which case it can  be  up
  101. to 44 characters in length.  Multi-word titles should appear in quotation marks.
  102.  
  103. "/DATE=NONE" says to leave off the date-time stamp for the file  on  the  status
  104. line.  This allows a user-defined title to be up to 44 characters in length.
  105.  
  106. "/line" puts line  "line"  at  the  top  of  the  screen.   Only  applicable  if
  107. "filespec" (vs "@listfile") is used.
  108.  
  109. "/MONO" (or "/-COLOR") forces the system into monochrome mode.
  110.  
  111. "/COLOR" or "/-MONO" forces the system into color mode.  This is  typically  the
  112. default.
  113.  
  114. "/EGA" or "/VGA" will put you in 43/50-line mode if your monitor supports  this.
  115. The two options are actually  synonymous  (you'll  get  the  best  your  monitor
  116. supports).  You can also switch to and from 25-line and 43/50-line  mode  within
  117. the program by using Alt-E.
  118.  
  119. "/-MOUSE" says to present the non-mouse menu bar even if a mouse is present.
  120.  
  121. "/DOS" allows access to the jump  to  DOS  feature  of  the  program.   This  is
  122. typically the default.
  123.  
  124. "/-DOS" prohibits jumping to DOS.
  125.  
  126. "/Iinitfile" says to read an initialization file with the file name  "initfile".
  127. The file specification *must* contain a period.  Initfiles are described in  the
  128. BRUCEINI.DOC file.  Initially defaults to "/IREAD.INI".
  129.  
  130. "/-I" (or "/INULL") says to skip loading the initialization file.
  131.  
  132.  
  133. READ.DOC                             4                         Revised: 01/20/96
  134.  
  135. "/Q" suppresses a message that shows up while  the  program  searches  for  your
  136. initfile.
  137.  
  138. "/PORT=port" specifies the printer port to use  for  printing.   This  typically
  139. defaults to /PORT=LPT1:.
  140.  
  141. "/INITT=string" ("initialize thin") provides the string that will be sent to the
  142. printer before printing if all lines in the document are 80 characters  or  less
  143. in length.  The string can  include  decimal  and  hexadecimal  characters  (see
  144. BRUCEHEX.DOC file).  "\027" is the code for the special character  Escape.   You
  145. can specify /INITT=NULL if desired.  Defaults to "/INITT=NULL".
  146.  
  147. "/INITW=string" ("initialize wide") provides the string that will be sent to the
  148. printer before printing if any lines in  the  document  (not  just  the  section
  149. printed) exceed 80  characters  in  length.   See  "/INITT=string"  description.
  150. Defaults to "/INITW=NULL".
  151.  
  152. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  153.         /INITT=\027E             (portrait mode, 80 column)
  154.         /INITW=\027E\027(s16.66H (portrait mode, 132 column)
  155.  
  156. "/AFTERP=string" specifies the string to  print  after  a  partial  document  is
  157. printed.  This string can include a page eject character ("\012") or any printer
  158. reset codes ("\012\027E") you want.  Initially defaults to "/AFTERP=\012".
  159.  
  160. "/AFTERF=string" specifies the string to print after a full document is printed.
  161. See "/AFTERP=string" description.  Defaults to "/AFTERF=\012".
  162.  
  163. "/COLOR=nnn nnn nnn nnn" specifies the color settings to use for (in order)  (1)
  164. regular text, (2) the status line, (3) marked text, and (4)  found  text.   Each
  165. setting must consist of three digits, the first two being the  foreground  color
  166. and the last being the background color.  The foreground color should be  padded
  167. on the left with a 0 if it is only one digit in length.  Defaults to "/COLOR=150
  168. 151 157 143".  You can stop providing numbers at any point after  the  first  if
  169. you're willing to accept the default colors.
  170.  
  171. Foreground colors:
  172.  
  173.         Low intensity           High intensity
  174.  
  175.         0 = black                8 = dark grey
  176.         1 = blue                 9 = light blue
  177.         2 = green               10 = light green
  178.         3 = cyan                11 = light cyan
  179.         4 = red                 12 = light red
  180.         5 = magenta             13 = light magenta
  181.         6 = brown               14 = light yellow
  182.         7 = white               15 = bright white
  183.  
  184. Adding 16 to any color will make the text blink.  Background colors can  consist
  185. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  186.  
  187. "/?" or "/HELP" shows you the syntax for the command.
  188.  
  189. "/?&H" gives you a hexadecimal and decimal conversion table.
  190.  
  191.  
  192. READ.DOC                             5                         Revised: 01/20/96
  193.  
  194. Return codes:
  195.  
  196. READ returns the following ERRORLEVEL codes:
  197.  
  198.         0 = no problems
  199.       254 = input file(s) not found
  200.       255 = syntax problems, or /? requested
  201.  
  202.  
  203. Viewing options:
  204.  
  205. While you're viewing a document with the READ command, you can use the following
  206. keys:
  207.  
  208. Cursor movement keys (up/down):
  209.  
  210.      Up                moves up one line
  211.      Down              moves down one line
  212.      Home              moves to the top line of the document
  213.      End               moves to the bottom line of the document
  214.      PgUp              moves up one screen's worth
  215.      PgDn              moves down one screen's worth
  216.      #line or Gline    moves to the given line in the document (goto line)
  217.      +line             moves forward a number of lines
  218.      -line             moves backward a number of lines
  219.  
  220. Cursor movement keys (right/left):
  221.  
  222.      Right             moves one column to the right
  223.      Left              moves one column to the left
  224.      Tab               moves 8 columns to the right
  225.      Shift-Tab         moves 8 columns to the left
  226.      Ctrl-Right        moves to the far right of the document
  227.      Ctrl-Left         moves to the far left of the document
  228.  
  229.  
  230. READ.DOC                             6                         Revised: 01/20/96
  231.  
  232. Search for text:
  233.  
  234.      \ or F or f       search for text within the document
  235.                        (the search is case-insensitive; "/COMMERCE" will find
  236.                        "Commerce", "commerce", and "COMMERCE")
  237.      /                 search for exact (case-sensitive) text within the
  238.                        document
  239.      F3                search for the next occurrence of that text
  240.      F9                search for the previous occurrence of that text
  241.  
  242. Marking lines:
  243.  
  244.      Alt-M             mark top line for copy or print
  245.      Alt-B             mark bottom line for copy or print
  246.      Alt-U             unmark all lines
  247.  
  248. Copying/printing lines (can copy/print either marked lines, all lines,  or  just
  249. the lines that are currently on the screen):
  250.  
  251.      Alt-C or Alt-D    copy (duplicate) lines to a file
  252.      Alt-P             print lines
  253.  
  254. Next/previous documents:
  255.  
  256.      Ctrl-PgUp         go to the previous file viewed
  257.      Ctrl-PgDn         go to the next file specified on the input line
  258.  
  259. Miscellaneous:
  260.  
  261.      Alt-E             toggles between 25-line and 43-/50-line mode (if your
  262.                        system supports EGA and VGA respectively)
  263.      Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  264.                        this feature can be turned off using the /-DOS switch
  265.      Alt-R             shows ruler at the top of the listing
  266.      Ctrl-P or Ctrl-F  do a form feed to the printer
  267.      F1                show key help screen
  268.      Esc               leave READ program
  269.  
  270. Note that you can't view beyond the beginning or end of the document.   This  is
  271. obvious but you cannot scroll to the right if  you're  already  seeing  the  far
  272. right of the display.
  273.  
  274.  
  275.  
  276. READ.DOC                             7                         Revised: 01/20/96
  277.  
  278. Marking and copying text:
  279.  
  280. If you need to copy a portion of your file to the printer  or  to  another  text
  281. file, you will typically want to mark sections of the text first.  This is  done
  282. using the mark functions:  Alt-M marks the top line  on  the  screen  and  Alt-B
  283. marks the bottom line on the screen.
  284.  
  285. For example, you might decide that you have a 2,000-line document and  you  want
  286. to print 50 lines of it.  Go to the first line you want to print  or  copy  (you
  287. can use the search options if you want to).  Get that line at either the top  of
  288. the screen or the bottom of the screen.  If it's the bottom line,  press  Alt-B;
  289. if it's the top line, press Alt-M.
  290.  
  291. Now go to the last line you want to print or copy.   Again,  get  that  line  at
  292. either the top of the screen or the bottom of the  screen  and  press  Alt-B  or
  293. Alt-M appropriately.  Having marked two lines, the program tags those lines  and
  294. all those lines between them.  You can use the F1 (help) key; it will  tell  you
  295. the first and last lines that are marked.
  296.  
  297. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to  print  them.
  298. When you select these functions, you'll be asked if  you  want  to  process  the
  299. whole file, just those lines on the  current  screen,  or  the  lines  that  are
  300. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be  asked  for
  301. the file name to copy the lines to.  If  the  file  already  exists,  you'll  be
  302. allowed to overwrite the existing file or append to it.
  303.  
  304. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C  in  which  case
  305. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  306.  
  307. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  308.     Typically, Alt-C will result in double-spaced printing.
  309.  
  310. (2) Alt-P may reset the printer based on the width of the current document if a
  311.     READ.INI file is used.
  312.  
  313. 
  314.